package com.medical.project.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.medical.project.system.mapper.InstitutionMapper;
import com.medical.project.system.domain.Institution;
import com.medical.project.system.service.IInstitutionService;

/**
 * 农合经办点Service业务层处理
 * 
 * @author tale
 * @date 2020-06-20
 */
@Service
public class InstitutionServiceImpl implements IInstitutionService 
{
    @Autowired
    private InstitutionMapper institutionMapper;

    /**
     * 查询农合经办点
     * 
     * @param institutionCode 农合经办点ID
     * @return 农合经办点
     */
    @Override
    public Institution selectInstitutionById(String institutionCode)
    {
        return institutionMapper.selectInstitutionById(institutionCode);
    }

    /**
     * 查询农合经办点列表
     * 
     * @param institution 农合经办点
     * @return 农合经办点
     */
    @Override
    public List<Institution> selectInstitutionList(Institution institution)
    {
        return institutionMapper.selectInstitutionList(institution);
    }

    /**
     * 新增农合经办点
     * 
     * @param institution 农合经办点
     * @return 结果
     */
    @Override
    public int insertInstitution(Institution institution)
    {
        return institutionMapper.insertInstitution(institution);
    }

    /**
     * 修改农合经办点
     * 
     * @param institution 农合经办点
     * @return 结果
     */
    @Override
    public int updateInstitution(Institution institution)
    {
        return institutionMapper.updateInstitution(institution);
    }

    /**
     * 批量删除农合经办点
     * 
     * @param institutionCodes 需要删除的农合经办点ID
     * @return 结果
     */
    @Override
    public int deleteInstitutionByIds(String[] institutionCodes)
    {
        return institutionMapper.deleteInstitutionByIds(institutionCodes);
    }

    /**
     * 删除农合经办点信息
     * 
     * @param institutionCode 农合经办点ID
     * @return 结果
     */
    @Override
    public int deleteInstitutionById(String institutionCode)
    {
        return institutionMapper.deleteInstitutionById(institutionCode);
    }
}
